package ran.manager;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import ran.constants.RedisCacheConstants;
import ran.redis.service.RedisService;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ran
 * Date: 2025-11-20
 * Time: 19:05
 */
@Component
public class QuestionRedisCacheManager {

    @Autowired
    private RedisService redisService;

    public void addCache(Long questionId) {
        redisService.leftPushForList(RedisCacheConstants.QUESTION_LIST, questionId);
    }
    public void deleteCache(Long questionId) {
        redisService.removeForList(RedisCacheConstants.QUESTION_LIST, questionId);
    }
}
